
public class Fibonacci
{
	public static void main(String[] args)
	{
		Fibonacci fibonacci = new Fibonacci();
		
		for (int i = 1; i <= 10; i++)
		{			
			System.out.println(i + " " + fibonacci.getFibonacciValue(i));
		}
	}
	
	
	public int getFibonacciValue(int n)
	{
		int m1 = 1;
		int m2 = 1;
		
		if(n == 1 || n == 2)
			return 1;
		
		for(int i = 2; i<n; i++)
		{
			int tmp = m2;
			m2 = m2 + m1;
			m1 = tmp;
		}
		
		return m2;
	}
}
